


<!DOCTYPE html>
<html id="htmlId">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
  <title>Coverage Report > LibraryController</title>
  <style type="text/css">
    @import "../../css/coverage.css";
    @import "../../css/idea.min.css";
  </style>
  <script type="text/javascript" src="../../js/highlight.min.js"></script>
  <script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
</head>

<body>
<div class="content">
<div class="breadCrumbs">
Current scope:     <a href="../../index.html">all classes</a>
    <span class="separator">|</span>
    <a href="../index.html">com.llsly.library.controller</a>
</div>

<h1>Coverage Summary for Class: LibraryController (com.llsly.library.controller)</h1>

<table class="coverageStats">
<tr>
  <th class="name">Class</th>
<th class="coverageStat 
">
  Class, %
</th>
<th class="coverageStat 
">
  Method, %
</th>
<th class="coverageStat 
">
  Line, %
</th>
</tr>
<tr>
  <td class="name">LibraryController</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (1/1)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    16.7%
  </span>
  <span class="absValue">
    (1/6)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    16.7%
  </span>
  <span class="absValue">
    (1/6)
  </span>
</td>
</tr>

</table>

<br/>
<br/>


<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package com.llsly.library.controller;
&nbsp;
&nbsp;import com.llsly.library.model.Book;
&nbsp;import com.llsly.library.service.LibraryService;
&nbsp;import org.springframework.beans.factory.annotation.Autowired;
&nbsp;import org.springframework.web.bind.annotation.*;
&nbsp;
&nbsp;import java.util.List;
&nbsp;
&nbsp;@RestController
&nbsp;@RequestMapping(&quot;/library&quot;)
<b class="fc">&nbsp;public class LibraryController {</b>
&nbsp;    @Autowired
&nbsp;    private LibraryService libraryService;
&nbsp;
&nbsp;    @PostMapping(&quot;/add&quot;)
&nbsp;    public Book addBook(@RequestBody Book book) {
<b class="nc">&nbsp;        return libraryService.addBook(book);</b>
&nbsp;    }
&nbsp;
&nbsp;    @DeleteMapping(&quot;/remove/{id}&quot;)
&nbsp;    public void removeBook(@PathVariable Long id) {
<b class="nc">&nbsp;        libraryService.removeBook(id);</b>
&nbsp;    }
&nbsp;
&nbsp;    @GetMapping(&quot;/count&quot;)
&nbsp;    public long getBookCount() {
<b class="nc">&nbsp;        return libraryService.getBookCount();</b>
&nbsp;    }
&nbsp;
&nbsp;    @GetMapping(&quot;/has/{title}&quot;)
&nbsp;    public boolean hasBook(@PathVariable String title) {
<b class="nc">&nbsp;        return libraryService.hasBook(title);</b>
&nbsp;    }
&nbsp;
&nbsp;    @PutMapping(&quot;/update/{id}&quot;)
&nbsp;    public Book updateBook(@PathVariable Long id, @RequestBody Book updatedBook) {
<b class="nc">&nbsp;        return libraryService.updateBook(id, updatedBook);</b>
&nbsp;    }
&nbsp;}
</code>
</pre>
</div>

<script type="text/javascript">
(function() {
    var msie = false, msie9 = false;
    /*@cc_on
      msie = true;
      @if (@_jscript_version >= 9)
        msie9 = true;
      @end
    @*/

    if (!msie || msie && msie9) {
      hljs.highlightAll()
      hljs.initLineNumbersOnLoad();
    }
})();
</script>

<div class="footer">
    
    <div style="float:right;">generated on 2025-05-04 13:53</div>
</div>
</body>
</html>
